/*
 * Button.h
 *
 *  Created on: 2011-1-14
 *      Author: Administrator
 */

#ifndef BUTTON_H_
#define BUTTON_H_

#include "BaseControl.h"

class CButton : public CBaseControl
	{
public:
	static CButton* NewL(const TRect& aRect,const CCoeControl* aParent);
	static CButton* NewLC(const TRect& aRect,const CCoeControl* aParent);
	virtual ~CButton();
	
public:
	void Draw(CWindowGc& gc, const TRect& aRect) const;
	void DrawFocusEffect(CWindowGc& gc, const TRect& aRect) const;
	void DrawLostFocusEffect(CWindowGc& gc, const TRect& aRect) const;
	TKeyResponse OfferKeyEventL( 
				const TKeyEvent& aKeyEvent, 
				TEventCode aType );
	void HandlePointerEventL(const TPointerEvent& aPointerEvent);
	void SetLayout();
	void setStyle(TInt aStyle);
	void setFocusImageL(CImage* aImage);
	void setLostFocusImageL(CImage* aImage);
	
protected:
	CButton();
	void ConstructL(const TRect& aRect,const CCoeControl* aParent);
	CImage* iFocusImage;
	CImage* iLostFocusImage;
private:
	TInt iStyle;
	
public: 
    enum TButtonStyle
        {
		ENormal,
		ENoBounder,
		EToolBarItem
        };
	};

#endif /* BUTTON_H_ */
